<?php

namespace App\Http\Controllers\Admin;

use App\admin\Adlog;
use App\admin\Liuyan;
use App\Http\Controllers\Admin\LogHander;
use App\Http\Controllers\Controller;
use App\Http\Middleware;
use Illuminate\Http\Request;
use Intervention\Image\ImageManagerStatic as Image;
use Illuminate\Routing\Controller as BaseController;

class LiuyanController extends BaseController
{
	public function __construct() {
		$this->middleware('admindo');
	}
	
	public function index(Request $request)
	{
		
	}
	
	public function LiuyanList(){
		$flight = Liuyan::orderBy('id', 'desc')->paginate(15);
		return view('admin.liuyanlist',['data' => $flight]);
	}
	
	public function Liuyandel(Request $request){
		$id = $request->input('id');
		$Newnet = new Liuyan;
		$back = $Newnet::find($id);
		if($back->delete()){
			return "ok";
		}else{
			return "no";
		}
	}
}
